import request from '@/utils/request'

// 查询弹药，存储弹药的基本信息列表
export function listAmmunition(query) {
  return request({
    url: '/ammunition/ammunition/list',
    method: 'get',
    params: query
  })
}

// 查询弹药，存储弹药的基本信息详细
export function getAmmunition(id) {
  return request({
    url: '/ammunition/ammunition/' + id,
    method: 'get'
  })
}

// 新增弹药，存储弹药的基本信息
export function addAmmunition(data) {
  return request({
    url: '/ammunition/ammunition',
    method: 'post',
    data: data
  })
}

// 修改弹药，存储弹药的基本信息
export function updateAmmunition(data) {
  return request({
    url: '/ammunition/ammunition',
    method: 'put',
    data: data
  })
}

// 删除弹药，存储弹药的基本信息
export function delAmmunition(id) {
  return request({
    url: '/ammunition/ammunition/' + id,
    method: 'delete'
  })
}
